/*
 * HashManager.h
 *
 *  Created on: 16/mag/2012
 *      Author: matteo
 */

#ifndef HASHMANAGER_H_
#define HASHMANAGER_H_

#include <string>
#include <vector>

typedef std::pair<char*, char* > VECTOR_LIMIT;

class HashManager {
public:
	HashManager(int _base, int _step, char* _vec);
	virtual ~HashManager();

	int hash(int idx_begin, int idx_end);

	int getHash();
	VECTOR_LIMIT getSubstring();
	virtual int getShift();

	int getLength();


protected:
	int					m_last_hash;
	int 				m_base;
	char* 				m_vector_elem;
	int					m_step;


	int 				m_pow;
	int					m_len;
};


#endif /* HASHMANAGER_H_ */
